package com.example.bloglearn.mapper;

import com.example.bloglearn.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;


import java.util.List;


@Repository
public interface UserMapper {
    @Select("select * from tb_user")
    List<User> findAll();

    @Select("SELECT * from tb_user WHERE userphone =#{userphone} AND userpass =#{userpass}")
    List<User> login(@Param("userphone") String userphone, @Param("userpass") String userpass);

}
